<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站内容管理系统</title>
<?php
loadcss(array('reset','shell'));
loadjs(array('jquery'),P_JS);
loadjs(array('tab','util','table','ovalidator'));
?>
<script type="text/javascript">
$(document).ready(function(e) {
var smallNowTab;
var pt = new Tabs();
pt.classpre="smalltab_";
pt.container = "smalltab_container";
pt.createTab("t1","编辑评论","",true,"n");
pt.init = function(){
	smallNowTab = pt.nowTab;
};
pt.onclick = function(){
	smallNowTab = pt.nowTab;
};		
pt.initTab();
pt.clickNowTab();    
});

$(document).ready(function(){ 
	
	
});

$(document).ready(function(){
//	oValidator.add([
//		{id:'title',name:'标题',error:'不能为空',empty:false},
//		{id:'content',name:'正文',error:'不能为空',empty:false},
//		{id:'mysort',name:'排序',error:'不能为空',empty:false}
//	]); 	
//	$('#myform').submit(function(){
//		if(!oValidator.pass()){
//			alert(oValidator.error_str('\n'));
//			return false;
//		}
//	});
});

</script>
<style>
body{margin:10px;}
</style>
</head>
<body>
<table class="settop">
<tr>
<td class="settop_left">
&nbsp;&nbsp;
</td>
<td>
<div id="smalltab_container"></div>
</td>
</tr>
</table>
<div class="smalltab_line"></div>
<div id="t1">
<br />
<br />
<form action="<?php echo url('comment','mod_','id='.$id);?>" method="post" id="myform">
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="mytable">
  <tr>
    <td align="right">评论人：</td>
    <td align="left"><?php echo $data['username'];?></td>
  </tr>
  <tr>
    <td align="right">匿名：</td>
    <td align="left"><?php echo intval($data['hidden']);?></td>
  </tr>
  <tr>
    <td align="right">IP：</td>
    <td align="left"><?php echo $data['ip'];?></td>
  </tr>
  <tr>
    <td align="right">文章标题：</td>
    <td align="left"><a href="<?php echo url('arc','mylist','id='.$data['arc_id']);?>" target="_blank"><?php echo $data['arc_title'];?></a></td>
  </tr>
  <tr>
    <td align="right">文章ID：</td>
    <td align="left"><?php echo $data['arc_id'];?></td>
  </tr>
  <tr>
    <td align="right">引用内容</td>
    <td align="left">
    <textarea name="quotation" id="quotation"  rows="8" cols="70"><?php echo $data['quotation'];?></textarea><span class="green">(最长300字符)</span><br/><span class="green">(请不要修改代码结构，仅可修改文字内容)</span>
    </td>
  </tr>
  <tr>
    <td align="right">星级：</td>
    <td align="left"><?php echo form_radio('star',array(3=>'好评',2=>'中评',1=>'差评'),$data['star'],'star_');?></td>
  </tr>
  <tr>
    <td align="right">评论内容</td>
    <td align="left"><textarea name="content" id="content"  rows="8" cols="70"><?php echo $data['content'];?></textarea><span class="green">(最长300字符)</span></td>
  </tr>
  <tr>
    <td align="right">回复内容</td>
    <td align="left">
    <textarea name="reply" id="reply" rows="8" cols="70"><?php echo $data['reply'];?></textarea><span class="green">(最长300字符)</span>
    <br />
<?php 
if($data['reply']) echo '管理员 '.$data['editor'].' 于 '.date('Y-m-d H:i:s',$data['replytime']).' 回复';
?>
    </td>
  </tr>
  <tr>
    <td align="right">编辑：</td>
    <td align="left"><input type="text" class="input" name="editor" value="<?php echo $data['editor'];?>" /><span class="green">(最长30字符)</span></td>
  </tr>
  <tr>
    <td align="right">状态：</td>
    <td align="left"><?php echo form_radio('status',array(1=>'显示',0=>'隐藏'),$data['status']);?></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="提交" class="color_btn color_btn_green" /></td>
    </tr>
</table>
</form>
</div>
</body>
</html>